Is Structural Subtyping Useful? An Empirical Study
نویسندگان
چکیده
Structural subtyping is popular in research languages, but all mainstream object-oriented languages use nominal subtyping. Since languages with structural subtyping are not in widespread use, the empirical questions of whether and how structural subtyping is useful have thus far remained unanswered. This study aims to provide answers to these questions. We identified several criteria that are indicators that nominally typed programs could benefit from structural subtyping, and performed automated and manual analyses of open-source Java programs based on these criteria. Our results suggest that these programs could indeed be improved with the addition of structural subtyping. We hope this study will provide guidance for language designers who are considering use of this subtyping discipline.
منابع مشابه
Multiplex Reverse Transcriptase-PCR Assay for Typing and Subtyping of Influenza A (H5 & H9) Virus in Iran
Avian influenza virus (AIV) infection is a major cause of bird or human mortality and morbidity, therefore the rapid identification of the virus is of important clinical and epidemiological implication. Methods: A multiplex Reverse Transcriptase PCR (RT-PCR) was optimized for the detection of influenza A virus and the H5 and H9 subtypes. The influenza type A specific primers were directed to t...
متن کاملCodingWithout Your Crystal Ball: Unanticipated Object-Oriented Reuse
In many ways, existing languages place unrealistic expectations on library and framework designers, allowing some varieties of client reuse only if it is explicitly— sometimes manually—supported. Instead, we should aim for the ideal: a language design that reduces the amount of prognostication that is required on the part of the original designers. In particular, I show that languages can and s...
متن کاملExtending Moby with Inheritance-Based Subtyping
There is a great divide between the study of the foundations of object-oriented languages and the practice of mainstream object-oriented languages like JAVA[AG98] and C++[Str97]. One of the most striking examples of this divide is the rôle that class inheritance plays in defining subtyping relations. In most foundational descriptions of OO languages, and in the language designs that these studi...
متن کاملDatatypes and Subtyping
We study a calculus with both subtyping and datatype deenitions. Our primary goal is to understand the interaction of subtyping with mutually recursive types, which raises diiculties beyond those addressed in previous studies. A second aim is to clarify the relations between structural subtyping and the user-declared subtyping found in languages such as C++, Eiiel, and Java.
متن کاملInheritance-Based Subtyping
Classes play a dual rôle in mainstream statically-typed object-oriented languages, serving as both object generators and object types. In such languages, inheritance implies subtyping. In contrast, the theoretical language community has viewed this linkage as a mistake and has focused on subtyping relationships determined by the structure of object types, without regard to their underlying impl...
متن کامل